package com.hq.service.impl;

import com.hq.mapper.AdminMapper;
import com.hq.model.Guide;
import com.hq.model.Passenger;
import com.hq.model.Root;
import com.hq.model.ScenicSpot;
import com.hq.service.AdminService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 管理员
 */
@Service
public class AdminServiceImpl implements AdminService {
    @Resource
    AdminMapper adminMapper;

    @Override
    public void updateScenicSpot(ScenicSpot scenicSpot) {
        adminMapper.updateScenicSpot(scenicSpot);
    }

    @Override
    public List<ScenicSpot> selectAll() {
        return adminMapper.selectAll();
    }

    @Override
    public ScenicSpot selectId(int id) {
        return adminMapper.selectId(id);
    }

    @Override
    public List<Guide> selectGuide() {
        return adminMapper.selectGuide();
    }


    @Override
    public Guide selectGuideId(int id) {
        return adminMapper.selectGuideId(id);
    }

    @Override
    public void updateGuide(Guide guide) {
        adminMapper.updateGuide(guide);
    }

    @Override
    public void deleteGuide(String username) {
        adminMapper.deleteGuide(username);
    }

    @Override
    public List<Passenger> selectPassenger() {
        return adminMapper.selectPassenger();
    }

    @Override
    public Passenger selectPassengerId(int id) {
        return adminMapper.selectPassengerId(id);
    }

    @Override
    public void updatePassenger(Passenger passenger) {
        adminMapper.updatePassenger(passenger);
    }

    @Override
    public void deletePassenger(int id) {
        adminMapper.deletePassenger(id);
    }

    @Override
    public void addGuide(Root root) {
        adminMapper.addGuide(root);
    }

    @Override
    public void addUsername(String username) {
        adminMapper.addUsername(username);
    }

    @Override
    public void deleteRoot(String username) {
        adminMapper.deleteRoot(username);
    }

    @Override
    public void addOne(ScenicSpot scenicSpot) {
        adminMapper.addOne(scenicSpot);
    }

    @Override
    public void deleteOne(int id) {
        adminMapper.deleteOne(id);
    }
}
